
import { createRouter, createWebHistory } from 'vue-router'
import Layout from "@/components/layout.vue"

const routes = [
    {
        path: '/',
        component: Layout,
        redirect: '/home',
        children: [
            {
                path: '/home',
                name: 'home',
                meta: { title: '首页'},
                component: () => import('@/views/home/index.vue')
            },
        ]
    },
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router